//
//  TWBriefCardCell.swift
//  EyepetizerImitative
//
//  Created by 田伟 on 2017/4/12.
//  Copyright © 2017年 个人. All rights reserved.
//

import UIKit

class TWBriefCardCell: UITableViewCell {

    @IBOutlet weak var iconImageView: UIImageView!
    @IBOutlet weak var authorTitleLabel: UILabel!
    @IBOutlet weak var detailLabel: UILabel!
    @IBOutlet weak var attentionButton: UIButton!
    
    var model : TWBriefCardModel?{
        didSet {
            guard let model = model else {
                return
            }
            
            iconImageView.sd_setImage(with: URL(string: model.icon!))
            authorTitleLabel.text = model.title
            detailLabel.text = model.tw_description
            
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        attentionButton.layer.masksToBounds = true
        attentionButton.layer.cornerRadius = 4
        attentionButton.layer.borderWidth = 1
        attentionButton.layer.borderColor = UIColor.black.cgColor
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
